*Time Series Analysis

use "Data_Replication_HL24_IS_Time_Series.dta", clear

*Set the data as time-series data

tsset time


*Figure 5

tsline appput antius, xline(39, lcolor(black)) xline(173, lcolor(black)) xline(219, lcolor(black)) xline(267, lcolor(black)) lcolor(black black) lpattern(solid dash) lwidth(mthin thick) graphr(color(white)) title({bf}Putin job approval (solid line) and anti-Americanism (dashed line) over time, size(medsmall) color(black) span) ytitle("Percent of population", size(medsmall)) xtitle("Month", size(small)) ylabel(0 "0" 20 "20" 40 "40" 60 "60" 80 "80" 100 "100", labsize(small)) xlabel(1 "2000" 13 "2001"  25 "2002" 37 "2003" 49 "2004" 61 "2005" 73 "2006" 85 "2007" 97 "2008" 109 "2009" 121 "2010" 133 "2011" 145 "2012" 157 "2013" 169 "2014" 181 "2015" 193 "2016" 205 "2017" 217 "2018" 229 "2019" 241 "2020" 253 "2021" 265 "2022" 277 "2023", angle(45) labsize(small)) saving(FRtsus20240603, replace)

*Note: Around the time of the Crimea annexation, data on anti-Americanism exist only for January and May 2014, so the big leap with the Crimea annexation occurs there. As for February 2022, the Levada survey was carried out between the 17th and the 21st, just before Putin's televized speech recognizing the LNR/DNR the evening of the 21st, so the March omnibus provides the first real "post-invasion" data point.


*Regression analysis

*Drop observations where either the measure of Putin approval or the measure of anti-Americanism are missing
drop if appput==.
drop if antius==.

*Reset the time variable used for the time series analysis (so that there are no missing values)
generate time2=_n
tsset time2

*Create variables needed for the analysis
generate post2014=1 if year>=2014
replace post2014=0 if post2014==.
generate tandem=1 if year>=2008 & year<2012
replace tandem=0 if tandem==.
*Create variable for antius first difference
generate antiusfd=antius-l.antius

*Table 4: 

eststo clear
regress d.appput antiusfd
eststo
regress d.appput antiusfd if time2~=114 & time2~=154 & time2~=155
eststo
regress d.appput c.year##c.antiusfd
eststo
regress d.appput c.year##c.antiusfd if time2~=114 & time2~=154 & time2~=155
eststo
regress d.appput c.post2014##c.antiusfd
eststo
regress d.appput c.post2014##c.antiusfd if time2~=114 & time2~=154 & time2~=155
eststo

esttab using FRtsregsmain20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(antiusfd "Anti-Americanism" year "Year" post2014 "Post-2014" c.year#c.antiusfd "Anti-Americanism x Year" c.post2014#c.antiusfd "Anti-Americanism x Post-2014") mtitles("All obs" "Without 3 obs" "All obs" "Without 3 obs" "All obs" "Without 3 obs") title("Table X. Marginal effects of change in anti-Americanism on Putin job approval 2000-2023") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-Americanism and Putin approval variables first-differenced. 'Without 3 obs' reports results when the three observations are dropped from the analysis: one observation spanning the Crimea annexation January-May 2014 and two observations spanning the full-scale invasion of Ukraine and its buildup November 2021-March 2022.") fonttbl(\f0\fnil Times New Roman; )
eststo clear


*Additional robustness checks on periodicity: Table OA18
eststo clear
regress d.appput antiusfd if year>2014
eststo
regress d.appput antiusfd if year>2014 & time2~=139 & time2~=154 & time2~=155
eststo
regress d.appput c.tandem##c.antiusfd
eststo

esttab using FRtsregspost2014andtandem20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(tandem "Tandem period" antiusfd "Anti-Americanism" year "Year" post2014 "Post-2014" c.tandem#c.antiusfd "Anti-Americanism x Tandem") mtitles("Post-2014" "Post-2014 w/o 3 obs" "All obs") title("Table X. Marginal effects of change in anti-Americanism on Putin job approval 2000-2023, additional robustness checks") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-Americanism and Putin approval variables first-differenced. 'Post-2014' means only data after 2014 are included in the analysis, and 'w/o 3 obs' reports results when the one observation spanning Russia's 2018 pension reform and the two observations spanning Russia's full-scale invasion of Ukraine and its building November 2021-March 2022 are dropped from the analysis.") fonttbl(\f0\fnil Times New Roman; )
eststo clear


********************Robustness check: Economic variables

*Table OA19
eststo clear
regress d.appput antiusfd growthy growthq realwage 
eststo
regress d.appput antiusfd growthy growthq realwage if time2~=114 & time2~=154 & time2~=155
eststo
regress d.appput c.year##c.antiusfd growthy growthq realwage 
eststo
regress d.appput c.year##c.antiusfd growthy growthq realwage if time2~=114 & time2~=154 & time2~=155
eststo
regress d.appput c.post2014##c.antiusfd growthy growthq realwage 
eststo
regress d.appput c.post2014##c.antiusfd growthy growthq realwage if time2~=114 & time2~=154 & time2~=155
eststo

esttab using FRtsmaineconcontrols20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(antiusfd "Anti-Americanism" year "Year" post2014 "Post-2014" c.year#c.antiusfd "Anti-Americanism x Year" c.post2014#c.antiusfd "Anti-Americanism x Post-2014" growthy "Growth yearly" growthq "Growth quarterly" realwage "Real wages") mtitles("All obs" "Without 3 obs" "All obs" "Without 3 obs" "All obs" "Without 3 obs") title("Table X. Marginal effects of change in anti-Americanism on Putin job approval 2000-2023 with economic controls") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-Americanism and Putin approval variables first-differenced. 'Without 3 obs' reports results when the three observations are dropped from the analysis: one observation spanning the Crimea annexation January-May 2014 and two observations spanning the full-scale invasion of Ukraine and its buildup November 2021-March 2022.") fonttbl(\f0\fnil Times New Roman; )
eststo clear


*******************Robustness check: anti-EUism

*Analogous regressions for anti-EU sentiment

use "Data_Replication_HL24_IS_Time_Series.dta", clear

*Set the data as time-series data
tsset time

*Plot of anti-EUism and Putin approval: Figure OA20
tsline appput antieu, xline(173) graphr(color(white)) title({bf}Putin job approval and anti-EU sentiment over time, size(medsmall) color(black) span) ytitle("Percent of population", size(small)) xtitle("Month", size(small)) ylabel(0 "0" 20 "20" 40 "40" 60 "60" 80 "80" 100 "100", labsize(small)) xlabel(1 "1/00" 13 "1/01"  25 "1/02" 37 "1/03" 49 "1/04" 61 "1/05" 73 "1/06" 85 "1/07" 97 "1/08" 109 "1/09" 121 "1/10" 133 "1/11" 145 "1/12" 157 "1/13" 169 "1/14" 181 "1/15" 193 "1/16" 205 "1/17" 217 "1/18" 229 "1/19" 241 "1/20" 253 "1/21" 265 "1/22" 277 "1/23", labsize(vsmall)) legend(pos(5) ring(0) col(1) label(1 "Putin approval") label(2 "Anti-EU sentiment")) caption("Data from Levada-Center omnibus tracking polls in Russia.", size(small)) saving(FRtseu20230621, replace)

*Now, dropping observations where either the measure of Putin approval or the measure of anti-EUism are missing
drop if appput==.
drop if antieu==.

*Resetting the time variable used for the time series analysis (so that there are no missing values)
generate time2=_n
tsset time2

*Create variables needed for the analysis
generate post2014=1 if year>=2014
replace post2014=0 if post2014==.
generate tandem=1 if year>=2008 & year<2012
replace tandem=0 if tandem==.
*Create variable for antieu first difference
generate antieufd=antieu-l.antieu

*Regression analysis: Table OA21

eststo clear
regress d.appput antieufd
eststo
regress d.appput antieufd if time2~=75
regress d.appput antieufd if time2~=75 & time2~=114 & time2~=115
eststo
regress d.appput c.year##c.antieufd
eststo
regress d.appput c.year##c.antieufd if time2~=75 & time2~=114 & time2~=115
eststo
regress d.appput c.post2014##c.antieufd
eststo
regress d.appput c.post2014##c.antieufd if time2~=75 & time2~=114 & time2~=115
eststo
regress d.appput c.post2014##c.antieufd if time2~=75 & time2~=114 & time2~=115 & time2~=100
eststo
esttab using FRtseumain20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(antieufd "Anti-EU sentiment" year "Year" post2014 "Post-2014" c.year#c.antieufd "Anti-EU sentiment x Year" c.post2014#c.antieufd "Anti-EU sentiment x Post-2014") mtitles("All obs" "Without 3 obs" "All obs" "Without 3 obs" "All obs" "Without 3 obs" "Without 4 obs") title("Table X. Marginal effects of change in anti-EU sentiment on Putin job approval 2003-2023") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-EU sentiment and Putin approval variables first-differenced. 'Without 3 obs' reports results when the following three observations are dropped from the analysis: one observation spanning the Crimea annexation January-May 2014 and two observations spanning the full-scale invasion of Ukraine and its buildup November 2021-March 2022. 'Without 4 obs' reports results when the one observation spanning Russia's 2018 pension reform is additionally dropped from the analysis.") fonttbl(\f0\fnil Times New Roman; )
eststo clear


*Additional robustness checks on periodicity: Table OA22
eststo clear
regress d.appput antieufd if year>2014
eststo
regress d.appput antieufd if year>2014 &  time2~=75 & time2~=114 & time2~=115 & time2~=100
eststo
regress d.appput c.tandem##c.antieufd
eststo
esttab using FRtseupost2014andtandem20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(tandem "Tandem period" antieufd "Anti-EU sentiment" year "Year" post2014 "Post-2014" c.tandem#c.antieufd "Anti-EU sentiment x Tandem") mtitles("Post-2014" "Post-2014 without 3 obs" "All obs") title("Table X. Marginal effects of change in anti-EU sentiment on Putin job approval 2000-2023, additional robustness checks") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-EU sentiment and Putin approval variables first-differenced. 'Post-2014' means only data after 2014 are included in the analysis. 'Without 3 obs' reports results when three observations are dropped from the analysis: the two observations spanning the full-scale invasion of Ukraine and its buildup November 2021-March 2022 and the one observation spanning Russia's 2018 pension reform.") fonttbl(\f0\fnil Times New Roman; )
eststo clear

*EU analysis with economic controls: Table OA23
regress d.appput antieufd growthy growthq realwage 
eststo
regress d.appput antieufd growthy growthq realwage if time2~=75 & time2~=114 & time2~=115 & time2~=100 
eststo
regress d.appput c.year##c.antieufd growthy growthq realwage 
eststo
regress d.appput c.year##c.antieufd growthy growthq realwage if time2~=75 & time2~=114 & time2~=115 & time2~=100
eststo
regress d.appput c.post2014##c.antieufd growthy growthq realwage 
eststo
regress d.appput c.post2014##c.antieufd growthy growthq realwage if time2~=75 & time2~=114 & time2~=115 & time2~=100
eststo
esttab using FRtseueconcontrols20230621.rtf, replace compress b(%9.2f) star(* 0.05 ** 0.01) se varwidth(27) coeflabel(antieufd "Anti-EU sentiment" year "Year" post2014 "Post-2014" c.year#c.antieufd "Anti-EU sentiment x Year" c.post2014#c.antieufd "Anti-EU sentiment x Post-2014" growthy "Growth yearly" growthq "Growth quarterly" realwage "Real wages") mtitles("All obs" "Without 4 obs" "All obs" "Without 4 obs" "All obs" "Without 4 obs") title("Table X. Marginal effects of change in anti-EU sentiment on Putin job approval 2000-2023 with economic controls") addnote("OLS, no weights or clustering of standard errors, years with missing data dropped, anti-EU sentiment and Putin approval variables first-differenced. 'Without 4 obs' reports results when four observations are dropped from the analysis: one observation spanning the Crimea annexation January-May 2014, two observations spanning the full-scale invasion of Ukraine and its buildup November 2021-March 2022, and one observation spanning Russia's 2018 pension reform.") fonttbl(\f0\fnil Times New Roman; )
eststo clear
